import { Table } from 'antd'
import React from 'react'

function TabCom({arr,columns,pageSize,pageNum,total,setPageNum,setPageSize}) {
    return (
        <div>
            <Table dataSource={arr} columns={columns}
                rowKey={'id'}
                pagination={
                    {
                        pageSize: pageSize,
                        pageNum: pageNum,
                        total: total,
                        onChange: (page, pageSize) => {
                            setPageNum(page)
                            setPageSize(pageSize)
                        }
                    }
                }
            />
        </div>
    )
}

export default TabCom
